home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / guis / gadutil / include / libraries / gadutil.i < prev   
Encoding:
Text File  |  1996-07-16  |  20.7 KB  |  617 lines

  1.     IFND    LIBRARIES_GADUTIL_I
  2. LIBRARIES_GADUTIL_I    SET    1
  3. **------------------------------------------------------------------------**
  4. *
  5. *    $VER: gadutil.i 37.7 (12.07.96)
  6. *
  7. *    Filename:    libraries/gadutil.i
  8. *    Version:    37.7
  9. *    Date:        12-Jul-96
  10. *
  11. *    Gadutil definitions, a dynamic gadget layout system.
  12. *
  13. *    © Copyright 1994-1996 by P-O Yliniemi and Staffan Hämälä.
  14. *
  15. *    All Rights Reserved.
  16. *
  17. **------------------------------------------------------------------------**
  18.  
  19.     IFND    EXEC_TYPES_I
  20.     INCLUDE    'exec/types.i'
  21.     ENDC
  22.  
  23.     IFND    EXEC_LIBRARIES_I
  24.     include    "exec/libraries.i"
  25.     ENDC
  26.  
  27.     IFND    UTILITY_TAGITEM_I
  28.     INCLUDE    'utility/tagitem.i'
  29.     ENDC
  30.  
  31.     IFND    INTUITION_INTUITION_I
  32.     INCLUDE    'intuition/intuition.i'
  33.     ENDC    
  34.  
  35. **------------------------------------------------------------------------**
  36. *
  37. * Extended gadget types available in GadUtil.library.
  38. *
  39.  
  40. IMAGE_KIND:            equ    50
  41. LABEL_KIND:            equ    51
  42. DRAWER_KIND:        equ    52
  43. FILE_KIND:        equ    53
  44. BEVELBOX_KIND:        equ    54
  45. PROGRESS_KIND:        equ    55
  46.  
  47. **-------------------- Reserved GadgetID's - don't use! ------------------**
  48. *
  49. * GadgetID's are really word sized, but two of these vaules are used by the
  50. * GU_HelpGadget tag, so don't use -1 (65535), -2 (65534) or -3 (65533) as
  51. * GadgetID!
  52. *
  53.  
  54. GADID_RESERVED:        equ    $FFFFFFFF
  55. WINTITLE_HELP:        equ    $FFFFFFFE
  56. SCRTITLE_HELP:        equ    $FFFFFFFD
  57.  
  58. **--------------- Minimum recommended sizes for some gadgets -------------**
  59. FILEKIND_WIDTH:        equ    20
  60. FILEKIND_HEIGHT:    equ    14
  61.  
  62. DRAWERKIND_WIDTH:    equ    20
  63. DRAWERKIND_HEIGHT:    equ    14
  64.  
  65. **------------------ Text placement for LABEL_KIND -----------------------**
  66. *
  67. *    ___1_____2_____3___
  68. *    |_____|_____|_____| A    Nine different placements of the text is
  69. *    |_____|_____|_____| B    possible if the size of the box allows it.
  70. *    |_____|_____|_____| C    The flags are the same as for BEVELBOX_KIND
  71. *
  72.  
  73. LB_TEXT_TOP:        equ    0    ; Place text on line A of the box
  74.  
  75. LB_TEXT_MIDDLE:        equ    1    ; Place text on line B of the box
  76.  
  77. LB_TEXT_BOTTOM:        equ    2    ; Place text on line C of the box
  78.  
  79. LB_TEXT_CENTER:        equ    0    ; Place text in column 2 of the box
  80.  
  81. LB_TEXT_LEFT:        equ    4    ; Place text in column 1 of the box
  82.  
  83. LB_TEXT_RIGHT:        equ    8    ; Place text in column 3 of the box
  84.  
  85. **----------------- Alternatives for text placement flags ----------------**
  86. LB_TEXT_TOP_CENTER:    equ    LB_TEXT_TOP!LB_TEXT_CENTER
  87. LB_TEXT_TOP_LEFT:    equ    LB_TEXT_TOP!LB_TEXT_LEFT
  88. LB_TEXT_TOP_RIGHT:    equ    LB_TEXT_TOP!LB_TEXT_RIGHT
  89.  
  90. LB_TEXT_MIDDLE_CENTER:    equ    LB_TEXT_MIDDLE!LB_TEXT_CENTER
  91. LB_TEXT_MIDDLE_LEFT:    equ    LB_TEXT_MIDDLE!LB_TEXT_LEFT
  92. LB_TEXT_MIDDLE_RIGHT:    equ    LB_TEXT_MIDDLE!LB_TEXT_RIGHT
  93.  
  94. LB_TEXT_BOTTOM_CENTER:    equ    LB_TEXT_BOTTOM!LB_TEXT_CENTER
  95. LB_TEXT_BOTTOM_LEFT:    equ    LB_TEXT_BOTTOM!LB_TEXT_LEFT
  96. LB_TEXT_BOTTOM_RIGHT:    equ    LB_TEXT_BOTTOM!LB_TEXT_RIGHT
  97.  
  98. **---------------------- Text shadow placement flags ---------------------**
  99. LB_SHADOW_DR:        equ    0    ; Place the shadow at x+1, y+1
  100. LB_SHADOW_UR:        equ    16    ; Place the shadow at x+1, y-1
  101. LB_SHADOW_DL:        equ    32    ; Place the shadow at x-1, y+1
  102. LB_SHADOW_UL:        equ    48    ; Place the shadow at x-1, y-1
  103.  
  104. **------------ Alternatives for text shadow placement flags --------------**
  105. LB_SUNAT_UL:        equ    0    ; Place the shadow at x+1, y+1
  106. LB_SUNAT_DL:        equ    16    ; Place the shadow at x+1, y-1
  107. LB_SUNAT_UR:        equ    32    ; Place the shadow at x-1, y+1
  108. LB_SUNAT_DR:        equ    48    ; Place the shadow at x-1, y-1
  109.  
  110. LB_3DTEXT:        equ    64    ; Alternative to GULB_3DText, TRUE
  111.  
  112. **----------------------- Bevel box frame types  -------------------------**
  113. BFT_BUTTON:        equ    0    ; Normal button bevel box border
  114. BFT_RIDGE:        equ    1    ; STRING_KIND bevel box border
  115. BFT_DROPBOX:        equ    2    ; Icon dropbox type border
  116.  
  117. BFT_HORIZBAR:        equ    10    ; Horizontal shadowed line
  118. BFT_VERTBAR:        equ    11    ; Vertical shadowed line
  119.  
  120. **------------------ Text placement for BEVELBOX_KIND --------------------**
  121. BB_TEXT_ABOVE:        equ    0    ; Place bevel box text above the
  122.                     ;  upper border     ___ Example ___
  123.  
  124. BB_TEXT_IN:        equ    1    ; Place bevel box text centered at
  125.                     ;  the upper border --- Example ---
  126.  
  127. BB_TEXT_BELOW:        equ    2    ; Place bevel box text below the
  128.                     ;  upper border     ___         ___
  129.                     ;                       Example
  130.  
  131. BB_TEXT_CENTER:        equ    0    ; Place the text centered at the
  132.                     ;  upper border (default)
  133.  
  134. BB_TEXT_LEFT:        equ    4    ; Place the text left adjusted
  135.  
  136. BB_TEXT_RIGHT:        equ    8    ; Place the text right adjusted
  137.  
  138. **----------------- Alternatives for text placement flags ----------------**
  139. BB_TEXT_ABOVE_CENTER:    equ    BB_TEXT_ABOVE!BB_TEXT_CENTER
  140. BB_TEXT_ABOVE_LEFT:    equ    BB_TEXT_ABOVE!BB_TEXT_LEFT
  141. BB_TEXT_ABOVE_RIGHT:    equ    BB_TEXT_ABOVE!BB_TEXT_RIGHT
  142.  
  143. BB_TEXT_IN_CENTER:    equ    BB_TEXT_IN!BB_TEXT_CENTER
  144. BB_TEXT_IN_LEFT:    equ    BB_TEXT_IN!BB_TEXT_LEFT
  145. BB_TEXT_IN_RIGHT:    equ    BB_TEXT_IN!BB_TEXT_RIGHT
  146.  
  147. BB_TEXT_BELOW_CENTER:    equ    BB_TEXT_BELOW!BB_TEXT_CENTER
  148. BB_TEXT_BELOW_LEFT:    equ    BB_TEXT_BELOW!BB_TEXT_LEFT
  149. BB_TEXT_BELOW_RIGHT:    equ    BB_TEXT_BELOW!BB_TEXT_RIGHT
  150.  
  151. **---------------------- Text shadow placement flags ---------------------**
  152. BB_SHADOW_DR:        equ    0    ; Place the shadow at x+1, y+1
  153. BB_SHADOW_UR:        equ    16    ; Place the shadow at x+1, y-1
  154. BB_SHADOW_DL:        equ    32    ; Place the shadow at x-1, y+1
  155. BB_SHADOW_UL:        equ    48    ; Place the shadow at x-1, y-1
  156.  
  157. **------------ Alternatives for text shadow placement flags --------------**
  158. BB_SUNAT_UL:        equ    0    ; Place the shadow at x+1, y+1
  159. BB_SUNAT_DL:        equ    16    ; Place the shadow at x+1, y-1
  160. BB_SUNAT_UR:        equ    32    ; Place the shadow at x-1, y+1
  161. BB_SUNAT_DR:        equ    48    ; Place the shadow at x-1, y-1
  162.  
  163. BB_3DTEXT:        equ    64    ; Alternative to GUBB_3DText, TRUE
  164.  
  165. **------------------------------------------------------------------------**
  166. *
  167. * This is the structure that actually holds the definition of a single
  168. * gadget.  It contains the new layout tags defined below, as well as the
  169. * normal GadTools tags.  You setup all the gadgets in a window by
  170. * making an array of this structure and passing it to GU_LayoutGadgetsA().
  171. *
  172.     STRUCTURE LayoutGadget,0
  173.         WORD lg_GadgetID        ; Gadget ID
  174.         APTR lg_LayoutTags        ; struct TagItem ptr
  175.         APTR lg_GadToolsTags        ; struct TagItem ptr
  176.         APTR lg_Gadget            ; struct Gadget ptr
  177.     LABEL lg_SIZEOF
  178.  
  179. **------------------------------------------------------------------------**
  180. *
  181. * Structure used to hold the built in strings of a localized program. These
  182. * strings will be used if we couldn't get a string from the catalog.
  183. *
  184. *
  185.     STRUCTURE AppString,0
  186.         ULONG    as_ID            ; String ID
  187.         APTR    as_Str            ; String pointer
  188.     LABEL as_SIZEOF
  189.  
  190. **------------------------------------------------------------------------**
  191. * A useful macro to fill a LayoutGadget structure.
  192. *
  193. * Usage:        GADGET  GadgetID,  Gad_LayoutTags,  Gad_GadToolsTags
  194. *
  195.  
  196. GADGET:    MACRO
  197.     dc.w    \1
  198.     dc.l    \2,\3,0
  199.     ENDM
  200.  
  201. LASTGAD: MACRO
  202.     dc.w    -1
  203.     dc.l    NULL,NULL,NULL
  204.     ENDM
  205.  
  206. **------------------------------------------------------------------------**
  207. * A macro to define a localized NewMenu structure
  208. *
  209. * Usage:        LOCMENU Type, Label ID, Flags, MutualExclude, UserData
  210. *
  211. * The string format for the label and shortcut key is:
  212. *
  213. *       SHORTCUTKEY, NULL, LABEL
  214. *
  215. * Use space for no shortcut.
  216. *
  217. * Examples:
  218. *
  219. * MNU_Edit_Cut:   dc.b  "X",0,"Cut"             ; Shortcut = Amiga X
  220. * MNU_Edit_Copy:  dc.b  "C",0,"Copy"            ; Shortcut = Amiga C
  221. * MNU_Edit_Paste: dc.b  "V",0,"Paste"           ; Shortcut = Amiga V
  222. * MNU_Edit_Erase: dc.b  " ",0,"Erase"           ; No shortcut
  223. *
  224.  
  225. LOCMENU: MACRO
  226.          dc.b    \1,0           ; Type, pad
  227.          dc.l    \2,0           ; Catalog string ID for label and cmd key
  228.          dc.w    \3             ; Flags
  229.          dc.l    \4,\5          ; MutualExclude, UserData
  230.          ENDM
  231.  
  232. **------------------------------------------------------------------------**
  233. *
  234. * Gadutil.library is basically an extension to Gadtools.library.  It adds
  235. * to GadTools the ability to dynamically layout gadgets according to the
  236. * positions of other gadgets, font size, locale, etc.  The goal in designing
  237. * this was to create a system so that programmers could easily create a GUI
  238. * that automatically adjusted to a user's environment.
  239. *
  240. * Every gadget is now defined as a TagList, there is no more need to make use
  241. * of the NewGadget structure as this taglist allows you to access all fields
  242. * used in that structure.  An array of the TagLists for all your window's
  243. * gadgets is then passed to GU_LayoutGadgetsA() and your gadget list is
  244. * created.
  245. *
  246.  
  247. GU_TagBase:    equ    TAG_USER+$60000
  248.  
  249. ************ Define which kind of gadget we are going to have. *************
  250.  
  251. GU_GadgetKind:    equ    GU_TagBase+1    ; Which kind of gadget to make.
  252.  
  253.  
  254. ********************** Gadget width control. *******************************
  255.  
  256. GU_Width:    equ    GU_TagBase+20    ; Absolute gadget width.
  257.  
  258. GU_DupeWidth:    equ    GU_TagBase+21    ; Duplicate the width of
  259.                     ;  another gadget
  260.  
  261. GU_AutoWidth:    equ    GU_TagBase+22    ; Set width according to length
  262.                     ;  of text label + ti_Data
  263.  
  264. GU_Columns:    equ    GU_TagBase+23    ; Set width so that approximately
  265.                     ;  ti_Data columns will fit.
  266.  
  267. GU_AddWidth:    equ    GU_TagBase+24    ; Add some value to the total
  268.                     ;  width calculation.
  269.  
  270. GU_MinWidth:    equ    GU_TagBase+25    ; Make sure width is at least this
  271.  
  272. GU_MaxWidth:    equ    GU_TagBase+26    ; Make sure width is at most this
  273.  
  274. GU_AddWidChar:    equ    GU_TagBase+27    ; Add length of ti_Data characters
  275.                     ;  to the gadget width
  276.  
  277. GU_FractWidth:    equ    GU_TagBase+28    ; Divide / multiply gadget width
  278.                     ;  with ti_Data
  279.  
  280. ********************** Gadget height control. ******************************
  281.  
  282. GU_Height:    equ    GU_TagBase+40    ; Absolute gadget height.
  283.  
  284. GU_DupeHeight:    equ     GU_TagBase+41    ; Duplicate the height of another
  285.                     ;  gadget.
  286.  
  287. GU_AutoHeight:    equ    GU_TagBase+42    ; Set height according to height
  288.                     ;  of text font + ti_Data.
  289.  
  290. GU_HeightFactor: equ    GU_TagBase+43    ; Make the gadget height a
  291.                     ;  multiple of the font height.
  292.  
  293. GU_AddHeight:    equ    GU_TagBase+44    ; Add some value to the total
  294.                     ;  height calculation
  295.  
  296. GU_MinHeight:    equ    GU_TagBase+45    ; Make sure height is at least this
  297.  
  298. GU_MaxHeight:    equ    GU_TagBase+46    ; Make sure height is at most this
  299.  
  300. GU_AddHeiLines:    equ    GU_TagBase+47    ; Add the height of ti_Data lines
  301.                     ;  to the gadget height
  302.  
  303. GU_FractHeight:    equ    GU_TagBase+48    ; Divide / multiply gadget height
  304.                     ;  with ti_Data
  305.  
  306. ******************** Gadget top edge control. ******************************
  307.  
  308. GU_Top:        equ    GU_TagBase+60    ; Absolute top edge.
  309.  
  310. GU_TopRel:    equ    GU_TagBase+61    ; Top edge relative to bottom
  311.                     ;  edge of another gadget.
  312.  
  313. GU_AddTop:    equ    GU_TagBase+62    ; Add some value to the final
  314.                      ;  top edge calculation.
  315.  
  316. GU_AlignTop:    equ    GU_TagBase+63    ; Align top edge of gadget with
  317.                     ;  top edge of another gadget.
  318.  
  319. GU_AdjustTop:    equ    GU_TagBase+64    ; Add the height of the text
  320.                     ;  font + ti_Data to the top edge.
  321.  
  322. GU_AddTopLines: equ    GU_TagBase+65    ; Add the height of ti_Data lines
  323.                     ;  to the top edge
  324.  
  325. ******************** Gadget bottom edge control. ***************************
  326.  
  327. GU_Bottom:    equ    GU_TagBase+80    ; Absolute bottom edge.
  328.  
  329. GU_BottomRel:    equ    GU_TagBase+81    ; Bottom edge relative to top
  330.                     ;  edge of another gadget.
  331.  
  332. GU_AddBottom:    equ    GU_TagBase+82    ; Add some value to the final
  333.                     ;  bottom edge calculation.
  334.  
  335. GU_AlignBottom:    equ    GU_TagBase+83    ; Align bottom edge of gadget with
  336.                     ;  bottom edge of another gadget.
  337.  
  338. GU_AdjustBottom: equ    GU_TagBase+84   ; Subtract the height of the text
  339.                                         ;  font + ti_Data from the top edge.
  340.  
  341. ************************ Gadget left edge control. *************************
  342.  
  343. GU_Left:    equ    GU_TagBase+100    ; Absolute left edge.
  344.  
  345. GU_LeftRel:    equ    GU_TagBase+101    ; Left edge relative to right
  346.                     ;  edge of another gadget.
  347.  
  348. GU_AddLeft:    equ    GU_TagBase+102    ; Add some value to the final
  349.                     ;  left edge calculation.
  350.  
  351. GU_AlignLeft:    equ    GU_TagBase+103    ; Align left edge of gadget with
  352.                     ;  left edge of another gadget.
  353.  
  354. GU_AdjustLeft:    equ    GU_TagBase+104    ; Add the width of the text
  355.                     ;  label + ti_Data to the left edge.
  356.  
  357. GU_AddLeftChar: equ    GU_TagBase+105    ; Add length of ti_Data characters
  358.                     ;  to the left edge.
  359.  
  360. *********************** Gadget right edge control. *************************
  361.  
  362. GU_Right:    equ    GU_TagBase+120    ; Absolute right edge.
  363.  
  364. GU_RightRel:    equ    GU_TagBase+121    ; Right edge relative to left
  365.                     ;  edge of another gadget.
  366.  
  367. GU_AddRight:    equ    GU_TagBase+122    ; Add some value to the final
  368.                     ;  right edge calculation.
  369.  
  370. GU_AlignRight:    equ    GU_TagBase+123    ; Align right edge of gadget with
  371.                     ;  right edge of another gadget.
  372.  
  373. GU_AdjustRight: equ     GU_TagBase+124  ; Subtract the width of the text
  374.                                         ; label + ti_Data from the left edge
  375.  
  376. ******************************** Other tags ********************************
  377.  
  378. GU_ToggleSelect: equ    GU_TagBase+150  ; Make the gadget toggleselect
  379.  
  380. GU_Selected:    equ     GU_TagBase+151  ; Change toggleselect default to
  381.                                         ;  selected.
  382.  
  383. GU_HelpGadget:    equ    GU_TagBase+152    ; Gadget ID of a TEXT_KIND gadget that
  384.                     ; will show a short help text
  385.  
  386. GU_HelpText:    equ    GU_TagBase+153    ; Pointer to the text to be shown in
  387.                     ; the help gadget
  388.  
  389. GU_LocaleHelp:    equ    GU_TagBase+154    ; Localized version of GU_HelpText
  390.                     ; ti_Data of this tag is the string ID
  391.  
  392. ************ Access to the other fields of the NewGadget structure. ********
  393.  
  394. GU_GadgetText:    equ    GU_TagBase+160    ;  Gadget label. 
  395.  
  396. GU_TextAttr:    equ    GU_TagBase+161    ;  Desired font for gadget label.
  397.  
  398. GU_Flags:    equ    GU_TagBase+162    ;  Gadget flags.
  399.  
  400. GU_UserData:    equ    GU_TagBase+163    ;  Gadget UserData.
  401.  
  402. GU_LocaleText:    equ    GU_TagBase+164    ;  Gadget label taken from a locale.
  403.  
  404.  
  405. ***************** Tags for GadUtil's extended gadget kinds. ****************
  406.  
  407. **---------------------------- IMAGE_KIND tags ---------------------------**
  408. GUIM_Image:    equ    GU_TagBase+200    ; Image structure for an image
  409.                     ;  gadget
  410.  
  411. GUIM_ReadOnly:    equ    GU_TagBase+201    ; TRUE if read-only. 
  412.  
  413. GUIM_SelectImg: equ     GU_TagBase+202  ; Other image for IMAGE_KIND gadgets.
  414.  
  415. GUIM_BOOPSILook: equ    GU_TagBase+203  ; Change the look of the selected
  416.                                         ;  image on one-image-buttons.
  417.  
  418. **------------------------- BEVELBOX_KIND tags ---------------------------**
  419. GUBB_Recessed:    equ    GU_TagBase+220    ; TRUE for a recessed bevel box
  420.  
  421. GUBB_FrameType:    equ    GU_TagBase+221    ; Frame type for bevel box
  422.  
  423. GUBB_TextColor: equ    GU_TagBase+222    ; Color of title text above box
  424.  
  425. GUBB_TextPen:    equ    GU_TagBase+223    ; Pen to print title text with -
  426.                     ;  overrides GUBB_TextColor
  427.  
  428. GUBB_Flags:    equ    GU_TagBase+224    ; Text placement flags
  429.  
  430. GUBB_3DText:    equ    GU_TagBase+225    ; Tag to enable 3D text (shadow)
  431.                     ;  Not needed if GUBB_ShadowColor
  432.                     ;  or GUBB_ShadowPen is used
  433.  
  434. GUBB_ShadowColor: equ    GU_TagBase+226    ; Color of the title text's shadow
  435.  
  436. GUBB_ShadowPen:    equ    GU_TagBase+227    ; Pen to print the text's shadow
  437.                     ;  with - overrides GUBB_ShadowColor
  438.  
  439. **-------------------------- LABEL_KIND tags -----------------------------**
  440. GULB_TextColor: equ    GU_TagBase+222    ; Color of the text
  441.  
  442. GULB_TextPen:    equ    GU_TagBase+223    ; Pen to print text with -
  443.                     ;  overrides GULB_TextColor
  444.  
  445. GULB_Flags:    equ    GU_TagBase+224    ; Text placement flags
  446.  
  447. GULB_3DText:    equ    GU_TagBase+225    ; Tag to enable 3D text (shadow)
  448.                     ;  Not needed if GULB_ShadowColor
  449.                     ;  or GULB_ShadowPen is used
  450.  
  451. GULB_ShadowColor: equ    GU_TagBase+226    ; Color of the text's shadow
  452.  
  453. GULB_ShadowPen:    equ    GU_TagBase+227    ; Pen to print the text's shadow
  454.                     ;  with - overrides GULB_ShadowColor
  455.  
  456. **------------------------- PROGRESS_KIND tags ---------------------------**
  457. GUPR_FillColor:    equ    GU_TagBase+240    ; Color of filled part of indicator
  458.  
  459. GUPR_FillPen:    equ    GU_TagBase+241    ; Pen to fill the indicator with
  460.                     ;  - overrides GUPR_FillColor
  461.  
  462. GUPR_BackColor:    equ    GU_TagBase+242    ; Color of the background of the
  463.                     ;  indicator
  464.  
  465. GUPR_BackPen:    equ    GU_TagBase+243    ; Pen to use for the indocator's
  466.                     ;  background - overrides
  467.                     ;  GUPR_BackColor
  468.  
  469. GUPR_Current:    equ    GU_TagBase+244    ; Current value of the indicator
  470.  
  471. GUPR_Total:    equ    GU_TagBase+245    ; Total value for the indicator
  472.  
  473. ************** Tags passed directly to GU_LayoutGadgetsA(). ****************
  474.  
  475. GU_RightExtreme: equ    GU_TagBase+500    ; ti_Data is a pointer to a longword
  476.                     ;  that is used to store the right-
  477.                     ;  most point that a gadget will
  478.                     ;  exist in.
  479.  
  480. GU_LowerExtreme: equ    GU_TagBase+501    ; ti_Data is a pointer to a longword
  481.                     ;  that is used to store the lower-
  482.                     ;  most point that a gadget will
  483.                     ;  exist in.
  484.  
  485. GU_Catalog:    equ    GU_TagBase+502    ; Indicates locale for the gadgets. 
  486.  
  487. GU_DefTextAttr:    equ    GU_TagBase+503    ; Specifies a default font for use
  488.                     ;  with all gadgets, can still be
  489.                     ;  over-ridden with GU_TextAttr.
  490.  
  491. GU_AppStrings:    equ    GU_TagBase+504    ; Application string table w/IDs. 
  492.  
  493. GU_BorderLeft:    equ    GU_TagBase+505    ; Size of window left border. 
  494.  
  495. GU_BorderTop:    equ    GU_TagBase+506    ; Size of window top border. 
  496.  
  497. GU_NoCreate:    equ    GU_TagBase+507    ; Don't actually create the gadgets. 
  498.  
  499. GU_MinimumIDCMP: equ    GU_TagBase+508    ; Minimum required IDCMP, so that all
  500.                     ;  gadgets will work
  501.  
  502. ****************************** Hotkey tags ***********************************
  503.  
  504. GU_Hotkey:    equ    GU_TagBase+300    ; Hotkey for gadget (VANILLAKEY)
  505.  
  506. ********************* Boolean flags for hotkey code **************************
  507.  
  508. GU_HotkeyCase:    equ    GU_TagBase+301    ; TRUE for case sensitive hotkey
  509. GU_LabelHotkey:    equ    GU_TagBase+302    ; TRUE = get hotkey code from label
  510. GU_RawKey:    equ    GU_TagBase+303    ; TRUE if hotkey is a RAWKEY code
  511.  
  512. *********************** Constants for hotkey support ***********************
  513.  
  514. GADUSERMAGIC:    equ    $1122        ; Identification for structure
  515.  
  516. ******************** Public bit numbers for gu_Flags ***********************
  517.  
  518. GU_HOTKEYCASE:    equ    0        ; Hotkey is case-sensitive
  519. GU_RAWKEY:    equ    2        ; Hotkey is a RAWKEY code
  520.  
  521. ******************** Structure gg_UserData points to ***********************
  522. *
  523. * This structure is the public part of the allocated data structure for
  524. * hotkeys and IMAGE_KIND gadgets (including FILE_KIND and DRAWER_KIND).
  525. *
  526. * This structure should be considered READ ONLY. The only fields you may
  527. * change is the gu_Code and gu_Flags fields.
  528. *
  529. * DO NOT WRITE ANYTHING BEYOND THIS STRUCTURE WITHOUT ALLOCATING MEMORY FIRST
  530.  
  531.     STRUCTURE    GU_Public,0
  532.         WORD    gu_Magic    ; Identification word for structure
  533.         LONG    gu_GadFlags    ; Flags for GENERIC kind GadUtil gadgets
  534.         BYTE    gu_Flags    ; Flags for the hotkey type
  535.         BYTE    gu_Code        ; VANILLA or RAWKEY code to react on
  536.         WORD    gu_Active    ; Active entry for some gadget kinds
  537.         WORD    gu_MaxVal    ; Maximum value for some gadgets
  538.         WORD    gu_MinVal    ; Minimum value for some gadgets
  539.         LONG    gu_GadgetType    ; Gadget type that was created
  540.         APTR    gu_HelpGadget    ; Pointer to gadget for help text
  541.         APTR    gu_HelpText    ; The help text for this gadget
  542.     LABEL    GUPU_SIZEOF
  543.  
  544. **------------------------------------------------------------------------**
  545. **                  Library base                  **
  546. **------------------------------------------------------------------------**
  547.  
  548.     STRUCTURE    GadUtilBase,LIB_SIZE
  549.         UBYTE    gub_Flags        ; Private!
  550.         UBYTE    gub_pad            ; Private!
  551.  
  552.                 APTR    gub_GadToolsBase    ; The following library bases
  553.                 APTR    gub_GfxBase        ;  may be read and used by
  554.                 APTR    gub_IntBase        ;  your program
  555.                 APTR    gub_LocaleBase        ; LocaleBase may be NULL!
  556.                 APTR    gub_UtilityBase
  557.         APTR    gub_DiskFontBase    ; DiskFontBase may be NULL!
  558.  
  559.         LONG    gub_SegList        ; Private!
  560.     LABEL    GadUtilBase_SIZEOF
  561.  
  562.  
  563. GADUTILNAME:    MACRO
  564.         dc.b    "gadutil.library",0
  565.         ENDM
  566.  
  567. GADUTIL_VER:    equ    37
  568. GADUTIL_REV:    equ    5
  569.  
  570. **------------------------------------------------------------------------**
  571. **                  BevelBox structure              **
  572. **------------------------------------------------------------------------**
  573.     STRUCTURE BBoxData,0
  574.         WORD    bbd_XPos        ; X position of box
  575.         WORD    bbd_YPos        ; Y position of box
  576.         WORD    bbd_Width        ; Width of box
  577.         WORD    bbd_Height        ; Height of box
  578.  
  579.         WORD    bbd_LeftEdge        ; Left edge of text
  580.         WORD    bbd_TopEdge        ; Top edge of text
  581.         WORD    bbd_TextWidth        ; Pixel width of text
  582.  
  583.         LONG    bbd_TextFont        ; Font to print text with
  584.         LONG    bbd_Text        ; Text to display
  585.         
  586.         BYTE    bbd_FrontPen        ; Text color
  587.         BYTE    bbd_Flags        ; Text placement flags
  588.         BYTE    bbd_Recessed        ; Recessed frame
  589.         BYTE    bbd_FrameType        ; Type of box frame
  590.         BYTE    bbd_ShadowPen        ; Shadow color
  591.         BYTE    bbd_Reserved1        ; No use in v36.53 - reserved!
  592.         APTR    bbd_HelpGadget        ; Pointer to gadget for help text
  593.         APTR    bbd_HelpText        ; The help text for this gadget
  594.     LABEL bbd_SIZEOF
  595.  
  596. **------------------------------------------------------------------------**
  597. **              ProgressIndicator structure              **
  598. **------------------------------------------------------------------------**
  599.  
  600.     STRUCTURE ProgressGad,0
  601.         WORD    pg_XPos            ; X pos of box around gadget
  602.         WORD    pg_YPos            ; Y pos of box around gadget
  603.         WORD    pg_Width        ; Width of box around gadget
  604.         WORD    pg_Height        ; Height of box around gadget
  605.         LONG    pg_Current        ; Current value of indicator
  606.         LONG    pg_Total        ; Total value of indicator
  607.         BYTE    pg_FillColor        ; Color of upto current value
  608.         BYTE    pg_BackColor        ; Color from current to end
  609.         BYTE    pg_Flags        ; Flags
  610.         BYTE    pg_reserved1
  611.         WORD    pg_XFilledTo        ; Initialized to pg_XPos + 4
  612.         APTR    pg_HelpGadget        ; Pointer to gadget for help text
  613.         APTR    pg_HelpText        ; The help text for this gadget
  614.     LABEL pg_SIZEOF
  615.  
  616.     ENDC                            ; gadutil.i
  617.